#ifndef ODN_INPUTDEVICE_H
#define ODN_INPUTDEVICE_H

#include "ODN_Maths.h"

namespace ouden {

typedef short KeyCode;
typedef short MouseButton;

//TODO: Think about mouse button being a bit field

//Abstract input device interface
class IInputDevice
{
	public:
		
		virtual ~IInputDevice() 	{}
		
		//Captures the state of input devices
		virtual void 	captureInput() = 0;
		
		//Interface methods
		virtual bool 	isKeyDown(KeyCode iKey) = 0;
		virtual Vector 	getMousePos() = 0;
		virtual Vector 	getMouseRel() = 0;
		virtual bool 	isMouseButtonDown(short iButton) = 0;
		//TODO: Add mouse displacement vector and more
		
	protected:
		
		IInputDevice() 		{}
		
	private:
		
};

class IInputReceiver
{
	
public:
	
	virtual void onUnBufInput(IInputDevice* pInput) = 0;
	virtual void onKeyDown(KeyCode iKey) = 0;
	virtual void onKeyUp(KeyCode iKey) = 0;
	virtual void onKeyPress(KeyCode iKey) = 0;
	virtual void onMouseMove(Vector vPos, MouseButton iButtonState) = 0;
	
};

} //namespace ouden

#endif //ODN_INPUTDEVICE_H
